<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>卡片悬停</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      .container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .box {
        width: 350px;
        padding: 40px;
        background-color: #fff;
        box-sizing: border-box;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        text-align: center;
        overflow: hidden;
        position: relative;
      }
      .icon {
        width: 80px;
        height: 80px;
        color: #fff;
        border-radius: 50%;
        font-size: 40px;
        line-height: 80px;
        margin: 0 auto;
        transition: all 1s;
        box-shadow: 0 0 0 0 #e91e63;
        background-color: #e91e63;
      }
      .content {
        transition: all 1s;
      }
      .box:hover .icon {
        box-shadow: 0 0 0 400px #e91e63;
      }
      h3 {
        margin: 10px 0;
        font-size: 20px;
      }
      p {
        line-height: 25px;
      }
      a {
        display: inline-block;
        padding: 10px 20px;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        font-weight: 500;
        margin-top: 20px;
        cursor: pointer;
        position: relative;
        z-index: 3;
      }
      .box:hover .content {
        color: #fff;
      }
      .box::before {
        content: " ";
        width: 50%;
        height: 100%;
        position: absolute;
        left: 0;
        top: 0;
        background-color: rgba(255, 255, 255, 0.2);
        z-index: 2;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="box">
        <div class="icon">01</div>
        <div class="content">
          <h1>你懂CSS吗</h1>
          <p>你根本不懂CSS，只是了解</p>
          <p>没有错，精通CSS就在今天</p>
          <p>CSS3的动画值得你去学习</p>
          <a href="#">动手试一试</a>
        </div>
      </div>
    </div>
  </body>
</html>
